package atom.core3.spring.util;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;

import org.springframework.web.context.ContextLoaderListener;

public class MySpringContextListener  extends ContextLoaderListener{
    private ServletContext context = null;      
    public void contextInitialized(ServletContextEvent event) {     
		context = event.getServletContext();          

		super.contextInitialized(event);
		SpringContext.getInstance().initWebContext(context);
    }   
    public void contextDestroyed(ServletContextEvent event) {   

       this.context = null;     
    } 
}
